<?php
/*
Plugin Name: Plug In Studios Universal Navigation Bar
Plugin URI: https://code.google.com/p/pluginstudiosunb
Version: 1.0
Author: Kristian Matthews
License: GPL3
*/

// Register activation hook
function pisunb_register_activation_hook(){
	add_option('pisunb_facebook'	,'Default','','yes');
	add_option('pisunb_googleplus'	,'Default','','yes');
	add_option('pisunb_youtube'		,'Default','','yes');
	add_option('pisunb_twitter'		,'Default','','yes');
	add_option('pisunb_lastfm'		,'Default','','yes');
	add_option('pisunb_steam'		,'Default','','yes');
	add_option('pisunb_grooveshark'	,'Default','','yes');
	add_option('pisunb_rss'			,'Default','','yes');
}
register_activation_hook(__FILE__,'pisunb_register_activation_hook');

// Register deactivation hook
function pisunb_register_deactivation_hook() {
	delete_option('pisunb_facebook'		,'Default','','yes');
	delete_option('pisunb_googleplus'	,'Default','','yes');
	delete_option('pisunb_youtube'		,'Default','','yes');
	delete_option('pisunb_twitter'		,'Default','','yes');
	delete_option('pisunb_lastfm'		,'Default','','yes');
	delete_option('pisunb_steam'		,'Default','','yes');
	delete_option('pisunb_grooveshark'	,'Default','','yes');
	delete_option('pisunb_rss'			,'Default','','yes');
}
register_deactivation_hook( __FILE__, 'pisunb_register_deactivation_hook');

// Admin menu
if ( is_admin() ){
	function pisunb_admin_menu() {
		//add_menu_page('Plug In Studios','Plug In Studios','manage_options','pis','pis_admin',plugins_url('img/pis16.png',__FILE__ ));
		add_submenu_page('pis','Universal Navigation Bar','Universal Navigation Bar','administrator','pisunb','pisunb_admin');
	}
	/*function pis_admin() {
		include('pis_admin.php');
	}*/
	function pisunb_admin() {
		include('pisunb_admin.php');
	}
	add_action('admin_menu', 'pisunb_admin_menu');
}

?>